<%@ Page Language="C#" MasterPageFile="~/Presentacion/MasterPage.master" AutoEventWireup="true" CodeFile="UsuarioAdmin.aspx.cs" Inherits="UsuarioAdmin" Title="Usuarios" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:UpdatePanel runat="server" id="UpdatePanelUsuario">
    <ContentTemplate>
                <br />
                <table width="80%">
                    <tr>
                        <td colspan="3">
                           <asp:Label id="lblTituloUsuario" runat="server" CssClass="labelPageTitle"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3"><br /></td>
                    </tr>
                </table>
                <div class="divBorderOnly">
                    <table width="80%">            
                       <TR>
                                <TD>
                                    <asp:Label id="lblNombre" runat="server" cssclass="label" Text="<%$ Resources:Resource,lblUsuarioNombre %>"></asp:Label>&nbsp; 
                                    <asp:TextBox id="txtNombre" MaxLength="100" runat="server" CssClass="textContent" onkeypress="ingresoMayusculas();"></asp:TextBox>&nbsp; 
                                    <asp:Button id="btnBuscar" runat="server" CssClass="btn" Text="<%$ Resources:Resource,btnBuscar %>" OnClick="btnBuscar_Click"></asp:Button>&nbsp;
                                    <asp:Button id="btnImprimir" runat="server" CssClass="btn" Text="<%$ Resources:Resource,btnImprimir %>"></asp:Button>  
                                </TD>
                            </TR>
                    </table>
                </div>
                <asp:Panel id="pnlMensaje" runat="server" Visible="false">
                        <table width="100%">                
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lblMensaje" CssClass="labelContent" runat="server" Text="<%$ Resources:Resource,msg_ResultadoInvalido %>"></asp:Label>
                                    </td>
                                </tr>
                        </table>
                </asp:Panel>
                <asp:Panel id="pnlItems" runat="server" Visible="false"> 
                <TABLE width="100%">                                                                                                       
                    <tr>
                        <td>
                            <asp:GridView id="gvUsuario" runat="server" OnPageIndexChanging="gvUsuario_PageIndexChanging" CellPadding="2" AutoGenerateColumns="False" OnRowCommand="gvUsuario_RowCommand" AllowPaging="True" PageSize="10">
                                <Columns>
                                <asp:TemplateField visible = "false">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk" runat="server" />
                                        <asp:Label ID="lblUsuarioId" runat="server" Visible="False" Text='<%# Eval("UsuarioId") %>'></asp:Label>                            
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Login" HeaderText="<%$ Resources:Resource,gvUsuario_lblLogin %>">
                                    <HeaderStyle Width="70pt" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Nombres" HeaderText="<%$ Resources:Resource,gvUsuario_lblNombre %>">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle Width="150pt" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Email" HeaderText="<%$ Resources:Resource,gvUsuario_lblEmail %>">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle Width="150pt" />
                                </asp:BoundField>
                                <asp:BoundField DataField="PerfilNombre" HeaderText="<%$ Resources:Resource,gvUsuario_lblPerfil %>">
                                    <HeaderStyle Width="100pt" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Estado" HeaderText="Estado">
                                    <HeaderStyle Width="100pt" />
                                </asp:BoundField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                            <asp:LinkButton runat="server" Text="Editar" ID="lnkEdit" CommandName="Edit" CommandArgument='<%# Eval("UsuarioId") %>'></asp:LinkButton>                                        
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <RowStyle CssClass="gridItem" HorizontalAlign="Center"></RowStyle>
                            <EditRowStyle CssClass="gridItem" HorizontalAlign="Center"></EditRowStyle>
                            <PagerStyle CssClass="gridItem"></PagerStyle>
                            <HeaderStyle CssClass="gridHead" HorizontalAlign="Center"></HeaderStyle>
                            <AlternatingRowStyle CssClass="gridItem"></AlternatingRowStyle>
                          </asp:GridView> 
                       </TD>
                    </TR>                    
              </TABLE>
              </asp:Panel>
              <TABLE width="100%">
                <TR>
                    <TD>
                        <BR />
                    </TD>
                 </TR>
                 <TR>
                    <TD>
                        <asp:Button id="btnAgregar" onclick="btnAgregar_Click" runat="server" CssClass="btn" Text="<%$ Resources:Resource,btnAgregar %>"></asp:Button> 
                        <asp:Button id="btnEliminar" visible="false" onclick="btnEliminar_Click" runat="server" CssClass="btn" Text="<%$ Resources:Resource,btnEliminar %>"></asp:Button> 
                    </TD>
                 </TR>
              </TABLE>
</ContentTemplate>
        </asp:UpdatePanel>    
</asp:Content>

